import React, { Component } from 'react'
import {renderRoutes} from 'react-router-config'
import './Films.css'
export default class Films extends Component {
    render() {
        return (
            <div>
                <div className="films">
                    <div className="title" onClick={this.handleToggle}>Top250</div>
                    <div className="title" onClick={this.handleComingSoon}>ComingSoon</div>
                </div>
                {renderRoutes(this.props.route.children)}
            </div>
        )
    }
    handleToggle=()=>{
        this.props.history.push('/films/top250')
    }
    handleComingSoon=()=>{
        this.props.history.push('/films/comingSoon')
    }
}
